From: Giovanni Campagna Date: Tue, 20 Dec 2011 18:14:12 +0000 (+0100) Subject: StTextureCache: fix load_sliced_image with different sizes X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~7234 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=875b6d131b34853d7943155977a1977ab7788dd8;p=gnome-shell.git StTextureCache: fix load_sliced_image with different sizes grid_width and grid_height were inverted, which caused a crash in GdkPixbuf code. This was never noticed because the animation in the panel is a square. https://bugzilla.gnome.org/show_bug.cgi?id=666606 --- diff --git a/src/st/st-texture-cache.c b/src/st/st-texture-cache.c index 377f3b9d5..011512cc3 100644 --- a/src/st/st-texture-cache.c +++ b/src/st/st-texture-cache.c @@ -1226,9 +1226,9 @@ load_sliced_image (GSimpleAsyncResult *result, width = gdk_pixbuf_get_width (pix); height = gdk_pixbuf_get_height (pix); - for (y = 0; y < height; y += data->grid_width) + for (y = 0; y < height; y += data->grid_height) { - for (x = 0; x < width; x += data->grid_height) + for (x = 0; x < width; x += data->grid_width) { GdkPixbuf *pixbuf = gdk_pixbuf_new_subpixbuf (pix, x, y, data->grid_width, data->grid_height); g_assert (pixbuf != NULL);